home *** CD-ROM | disk | FTP | other *** search
-
- /* Generated by Interface Builder */
-
- // Abstract Class from which ghosts and pacs are derived.
- // This basically provides basic variables to hold it's location and
- // the necessary methods to access the location instance variables.
- // For basic funtionality, -move: and -renderAt::move: need to be overridden
- // -move: should set up px and py to tell the object which way to move
- // and renderAt::move: should be able to draw a representation of the
- // GameActor. Note that actual movement happens when -moveOneFrame is
- // called; -renderAt::move: will call -moveOneFrame if move:YES is chosen.
-
- #import <objc/Object.h>
-
-
- @interface GameActor:Object
- {
- id gameView; // the parent gameView
-
- int myX, myY; // where we're at
- int lastx, lasty; // where we were last drawn
- int px, py; // which way we're going (x-y velocities)
- }
-
- - init; // initialize the new instance vars
- - (int)xpos; // return our x-coord
- - (int)ypos; // return our y-coord
- - move:sender; // Move the actor one animation frame
- - lastAt:(float *)xx :(float *)yy; // to find out where actor was last drawn
- - at:(float *)xx :(float *)yy; // where is the actor now?
- - moveOneFrame; // makes the animation advance one step. Call -move:
- // first to set up params.
- - renderAt:(int)posx :(int)posy move:(BOOL)moveOk; // draw pac
- // you should lock focus on view that gets the Pac first.
-
- @end
-